<template>
	<view class="page_userSet">
		<view class="list">
			<navigator class="item" url="/pages/userSet/userInfo" >
				<text>个人资料</text>
				<uni-icons type="arrowright" color="#bcbcbc" size="24"></uni-icons>
			</navigator>
			<navigator class="item" url="/pages/userSet/passWord" v-if="userInfo.isPass" >
				<text>修改密码</text>
				<uni-icons type="arrowright" color="#bcbcbc" size="24"></uni-icons>
			</navigator>
			<navigator class="item" url="/pages/userSet/addNewPW" v-else >
				<text>添加密码</text>
				<uni-icons type="arrowright" color="#bcbcbc" size="24"></uni-icons>
			</navigator>
		</view>
		<view class="singOut" @click="singOut">退出登录</view>
	</view>
</template>

<script>
	import { mapState, mapActions } from "vuex";
	export default {
		data() {
			return {
				
			}
		},
		computed: {
			...mapState(["userInfo"]),
		},
		methods: {
			...mapActions(["reLogin"]),
			//退出登录
			singOut() {
				this.reLogin();
			}
		}
	}
</script>

<style scoped>
	page{
		background: #F5F5F5;
	}
	/* #ifdef APP-PLUS*/
	.page_userSet{
		height: 100vh;
		background: #F5F5F5 ;
	}
	/* #endif */
	.list{
		padding-top: 40rpx;
	}
	.item {
		width: 100%;
		padding: 30rpx;
		height: 108rpx;
		border-bottom: 2px solid #F5F5F5;
		background: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: space-between;
		font-size: 32rpx;
		box-sizing: border-box;
	}
	.singOut{
		position: fixed;
		bottom: calc(20px + var(--window-bottom));
		left: 30rpx;
		width: 690rpx;
		height: 98rpx;
		background-color: #ffffff;
		box-shadow: 0px 1px 0px 0px 
			rgba(0, 0, 0, 0.02);
		border-radius: 49rpx;
		color: #ff3347;
		font-size: 32rpx;
		line-height: 98rpx;
		text-align: center;
	}
</style>
